#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Lee
# File: stander.py
# Time: 2022/9/23 9:38
import sys
import unittest
from ddt import ddt, data, unpack
from appium import webdriver
from util.public import *


file_name = os.path.join(TEST_DATA_PATH, 'stander_data.xlsx')
test_data = read_excel(file_name, 'stander_data')


@ddt
class StanderCal(unittest.TestCase):

    @classmethod
    def setUpClass(cls) -> None:
        # 启动应用
        cls.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', caps)

    @data(*test_data)
    @unpack
    def test_add(self, locate_type, value):
        use_and_click(self.driver, locate_type, value)

    @classmethod
    def tearDownClass(cls) -> None:
        cls.driver.quit()


if __name__ == '__main__':
    unittest.main()